package com.example.smart.ui.m.frag

import android.view.View
import com.example.lib.extend.setOnDoubleClickListener
import com.example.lib.extend.setWidthOrHeight
import com.example.smart.base.ui.fragment.BaseFragment
import com.example.smart.databinding.FragCourseBinding
import com.example.smart.databinding.FragCourseMBinding
import com.example.smart.utils.DisplayUtils

class MCourseFragment : BaseFragment<FragCourseMBinding>() {

    companion object {
        fun getInstance(): MCourseFragment {
            return MCourseFragment()
        }
    }

    override fun initView(view: View) {

    }

    override fun initListener() {
        binding.Search.setOnDoubleClickListener {
            DisplayUtils.toSearch(activity)
        }

        binding.Rel1.setOnDoubleClickListener {
            DisplayUtils.toCourseDetails(activity)
            binding.Rel1.setWidthOrHeight(192, 94)
            binding.Rel2.setWidthOrHeight(192, 88)
        }

        binding.Rel2.setOnDoubleClickListener {
            DisplayUtils.toCourseDetails(activity)
            binding.Rel2.setWidthOrHeight(192, 94)
            binding.Rel1.setWidthOrHeight(192, 88)
        }
    }

}